package com.stage_1.module_2;

public class Manager extends Coder {
    private int bonus;

    public Manager() {
    }

    public Manager(String name, int id, int salary, int bonus) {
        super(name, id, salary);
        setBonus(bonus);
    }

    public int getBonus() {
        return bonus;
    }

    public void setBonus(int bonus) {
        if(bonus>0){
            this.bonus = bonus;
        }
        else{
            System.out.println("奖金不合理！");
        }
    }

    @Override
    public void work() {
        System.out.println("工号为"+getId()+"基本工资为"+getSalary()+"奖金为"+getBonus()+"的项目经理"+getName()+"正在努力的做着管理工作,分配任务,检查员工提交上来的代码……");
    }
}

